<?php

/*
 * gpa_new Description
 * date 18 Feb 10
 * time 21:57:12
 * @$package
 * @name screening_html
 * @filesource screening_html.php
 * @author Hanny Setiawan
 */

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Group of Photographic Artists</title>
<script src="<?php echo getJsUrl(); ?>jquery.js" type="text/javascript"></script>

<link rel="stylesheet" href="<?php echo getCssUrl(); ?>home/home.css" type="text/css">

<!-- start jQuery menu -->
<link type="text/css" href="<?php echo getCssUrl(); ?>menu_apycom/menu.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo getJsUrl(); ?>menu_apycom/menu.js"></script>
<!-- end of jQuery menu -->

<!-- start Lightbox Gallery Image-->
<script src="<?php echo getJsUrl(); ?>prettyPhoto/prettyPhoto.js" type="text/javascript"></script>
<script src="<?php echo getJsUrl(); ?>prettyComments/prettyComments.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo getCssUrl(); ?>prettyPhoto/prettyPhoto.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="<?php echo getCssUrl(); ?>gallery/gallery.css" type="text/css" media="screen"/>
<!-- end Lightbox Gallery Image -->

</head>
<body>

<div id="root">
    <div id="Table_01">
        <div id="index">
    	<div id="leftTop">
            <img class="logo" src="<?php echo getImgUrl(); ?>/home/logogpa.png" width="310" height="90" alt="Logo GPA">
        </div>
  		<div id="rightTop">
        	<div id="rTop">
            	<div class="login">
                    <div class="login-text">
                            <?php echo $usermenus; ?>
                    </div>
                    <div class="login-box">
                    	<input name="login-field" type="text" maxlength="30">
                    </div>
                </div>
            </div>
        	<div id="rBottom">
        		<div id="menu">
                    <?php echo $mainmenus; ?>
                </div>
        	</div>
    	</div>
	</div>
	<div id="index002">
            <div class="content">
                <h3>Screening</h3>
                <div id="screening_image">Loading Images...</div>
                <script type="text/javascript">
                (function($){
                    var pageI = 1;
                    function getNewImage() {
                        $.get("<?php echo getAppUrl('screening', 'ajax_get_images') . '/1' ?>", {"page":pageI++}, function(html){
                            var el = $(html).hide();
                            el.append($("#screening_image"));
                            el.fadeIn();
                        });
                    }
                    
                    $(function(){
                        $(".form_images").live('submit', function(e){
                            e.preventDefault();
                            e.stopPropagation();

                            var form = $(this);
                            var point = form.contents().find(":checked");

                            if(!point.length) {
                                alert("Please choose your decicion!");
                                return false;
                            }

                            if($(point).val() == "-") {
                                var comment = form.contents().find("textarea");
                                if($(comment).val().length < 20) {
                                    alert("You must comment min. 20 char!");
                                    return false;
                                }
                            }

                            $.post(form.attr('action'), form.serializeArray(), function(data){
                                if(data.success) {
                                    form.slideUp('slow', function(){form.remove();getNewImage();});
                                } else {
                                    alert(data.message);
                                }
                            }, 'json');

                            return false;
                        });
                    });
                    $('#screening_image').load("<?php echo getAppUrl('screening', 'ajax_get_images') . (isset($image_id)?'/?iid='.$image_id:''); ?>");
                })(jQuery);
                </script>
            </div>
        </div>
    </div>
</div>
    	<a id="thanks" href="http://apycom.com/">Apycom jQuery Menus</a>
</body>
</html>